from wineArea import Area

class CountryArea(Area):
    _debugPrefix = 'C '
    
    def addRegions(self, *areas):
        for a in areas:
            if isinstance(a,basestring):
                __import__('data.'+a)
                datamodule = sys.modules['data.'+a]
                a = datamodule.createRegion()
                a.parentArea = self
            else: # must be a tuple (name, id, cepages)
                name, id, _cepages = a
                a = self.generateUniqueSubArea(name=unicode(name),id=id,_cepages=_cepages, classname=self.__class__.__name__+id)
            self._system_subAreas[a.name] = a
            a.parentArea = self


    def getCountry(self):
        return self
